package com.caocaog.market.toccpt.ccptmodel;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.springframework.format.annotation.DateTimeFormat;

import java.math.BigDecimal;
import java.util.Date;

/**
 *@author liguang
 *@version 1.0.0
 *@Project jeecg-boot
 *@Package com.caocaog.market.ccpt.model
 *@ClassName CcOrder.java
 *@createTime 2021年12月22日 18:29:00
 *@Description 曹操跑腿订单，对应曹操跑腿系统中的cc_order表
 */
@Data
@Slf4j
public class CcOrder {
    /// <summary>
    /// Desc:  主键   自增
    /// Default:
    /// Nullable:False
    /// </summary>           
   @TableId(type = IdType.AUTO)
   @TableField("sid")
    private int sid ;

    /// <summary>
    /// Desc:订单归属
    /// Default:0
    /// Nullable:False
    /// </summary>           
   @TableField("agent_sid")
    private int agentSid ;

    /// <summary>
    /// Desc:骑士sid
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("staff_sid")
    private int staffSid ;

    /// <summary>
    /// Desc:订单号
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("order_no")
    private String orderNo ;

    /// <summary>
    /// Desc:订单类型 1：帮我送，2：帮我买，3：帮代办，4.。。    100以上表示一拖多的订单  order_type-100=n  n即为一拖几
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("order_type")
    private byte orderType ;

    /// <summary>
    /// Desc:订单状态 1：支付成功待接单，2：已接单，3：骑士到店，4：已取货/配送中，5：已送达，6：订单完成，21：用户取消订单，22：代理商取消订单，23：总后台取消订单
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("order_status")
    private byte orderStatus ;

    /// <summary>
    /// Desc:订单来源 1：IOS客户端，2：Android客户端，3：微信小程序，4：PC下单，5：一拖多，6：星选（多店），7：优选（单店），61到99麦芽田，61：麦芽田-美团，62：麦芽田-饿了么，63：麦芽田-其它，100以上为其它第三方，最高到255	
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("order_source")
    private byte orderSource ;

    /// <summary>
    /// Desc:第三方订单号，可以为空字符串，不可为Null
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("third_party_no")
    private String thirdPartyNo ;

    /// <summary>
    /// Desc:第三方餐号 
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("table_no")
    private String tableNo ;

    /// <summary>
    /// Desc:第三方回调地址，完整的请求url
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("callback_url")
    private String callbackUrl ;

    /// <summary>
    /// Desc:支付状态 1：支付成功，2：支付失败，默认为0 待支付
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("pay_status")
    private byte payStatus ;

    /// <summary>
    /// Desc:支付方式/途径 1：支付宝，2：微信，3：银联，4：京东支付，5：百度钱包，6：余额...
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("pay_way")
    private byte payWay ;

    /// <summary>
    /// Desc:支付流水号/支付单号
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("pay_serno")
    private String paySerno ;

    /// <summary>
    /// Desc:支付时间
    /// Default:
    /// Nullable:True
    /// </summary>           
    @TableField("pay_time")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date payTime ;

    /// <summary>
    /// Desc:关联cc_member.sid
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("member_sid")
    private int memberSid ;

    /// <summary>
    /// Desc:订单金额
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("amount")
    private BigDecimal amount ;

    /// <summary>
    /// Desc:订单起步价
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("start_price")
    private BigDecimal startPrice ;

    /// <summary>
    /// Desc:超出距离价格
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("beyond_price")
    private BigDecimal beyondPrice ;

    /// <summary>
    /// Desc:时间段加价
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("time_price")
    private BigDecimal timePrice ;

    /// <summary>
    /// Desc:特殊加价（天气）
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("special_price")
    private BigDecimal specialPrice ;

    /// <summary>
    /// Desc:优惠金额/扣减额
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("discounts")
    private BigDecimal discounts ;

    /// <summary>
    /// Desc:实际支付金额
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("pay_amount")
    private BigDecimal payAmount ;

    /// <summary>
    /// Desc:加价金额（客户主动加价）
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("raise_price")
    private BigDecimal raisePrice ;

    /// <summary>
    /// Desc:预付款
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("imprest")
    private BigDecimal imprest ;

    /// <summary>
    /// Desc:重量加价，25公斤以内（包含25）不加价，25-50公斤（包含50）加价10元，50公斤以上加价20元	
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("weight_price")
    private BigDecimal weightPrice ;

    /// <summary>
    /// Desc:订单完成后的打赏金额
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("reward_money")
    private BigDecimal rewardMoney ;

    /// <summary>
    /// Desc:优惠券sid
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("coupon_sid")
    private int couponSid ;

    /// <summary>
    /// Desc:订单距离（米）
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("order_dis")
    private int orderDis ;

    /// <summary>
    /// Desc:是否开启超时罚款 1：开启，2：关闭
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("is_open_penalty")
    private Boolean isOpenPenalty ;

    /// <summary>
    /// Desc:取货时间限制，单位 分钟，整数
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("take_timeout")
    private short takeTimeout ;

    /// <summary>
    /// Desc:取货超时罚款，单位：元，整数，最高200
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("take_penalty")
    private byte takePenalty ;

    /// <summary>
    /// Desc:送达时间限制，单位 分钟，整数
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("send_timeout")
    private short sendTimeout ;

    /// <summary>
    /// Desc:送达超时罚款，单位：元，整数，最高200	
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("send_penalty")
    private byte sendPenalty ;

    /// <summary>
    /// Desc:发货地址sid
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("send_addr_sid")
    private int sendAddrSid ;

    /// <summary>
    /// Desc:发货人姓名
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("send_name")
    private String sendName ;

    /// <summary>
    /// Desc:发货人手机号
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("send_mobile")
    private String sendMobile ;

    /// <summary>
    /// Desc:发货地址（详细地址）
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("send_addr")
    private String sendAddr ;

    /// <summary>
    /// Desc:发货地址aoi/简短/建筑物 名称
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("send_addr_aoi")
    private String sendAddrAoi ;

    /// <summary>
    /// Desc:发货门牌号
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("send_addr_house")
    private String sendAddrHouse ;

    /// <summary>
    /// Desc:发货地点经度
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("send_lon")
    private String sendLon ;

    /// <summary>
    /// Desc:发货地点纬度
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("send_lat")
    private String sendLat ;

    /// <summary>
    /// Desc:收货地址sid
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("receipt_addr_sid")
    private int receiptAddrSid ;

    /// <summary>
    /// Desc:收货人姓名
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("receipt_name")
    private String receiptName ;

    /// <summary>
    /// Desc:收货人手机号
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("receipt_mobile")
    private String receiptMobile ;

    /// <summary>
    /// Desc:收货地址（详细地址）
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("receipt_addr")
    private String receiptAddr ;

    /// <summary>
    /// Desc:收货地址aoi/简短/建筑物 名称
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("receipt_addr_aoi")
    private String receiptAddrAoi ;

    /// <summary>
    /// Desc:收货门牌号
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("receipt_addr_house")
    private String receiptAddrHouse ;

    /// <summary>
    /// Desc:收货地点经度
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("receipt_lon")
    private String receiptLon ;

    /// <summary>
    /// Desc:收货地点纬度
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("receipt_lat")
    private String receiptLat ;

    /// <summary>
    /// Desc:推送次数，最多4次
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("push_count")
    private byte pushCount ;

    /// <summary>
    /// Desc:是否预约单
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("is_scheduling")
    private Boolean isScheduling ;

    /// <summary>
    /// Desc:预约时间
    /// Default:
    /// Nullable:True
    /// </summary>           
    @TableField("scheduling_time")
    private Date schedulingTime ;

    /// <summary>
    /// Desc:接单时间
    /// Default:
    /// Nullable:True
    /// </summary>           
    @TableField("receive_time")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date receiveTime ;

    /// <summary>
    /// Desc:骑士就位时间/到店时间 
    /// Default:
    /// Nullable:True
    /// </summary>           
    @TableField("ready_time")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date readyTime ;

    /// <summary>
    /// Desc:取货时间
    /// Default:
    /// Nullable:True
    /// </summary>           
    @TableField("take_time")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date takeTime ;

    /// <summary>
    /// Desc:送达时间
    /// Default:
    /// Nullable:True
    /// </summary>           
    @TableField("send_time")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date sendTime ;

    /// <summary>
    /// 数据版本，每次更新操作+1
    /// </summary>
    @TableField("lock_version")
    private int lockVersion ;

    /// <summary>
    /// Desc:订单创建时间
    /// Default:DateTime.Now
    /// Nullable:False
    /// </summary>           
    @TableField("create_date")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date createDate ;


    /// <summary>
    /// Desc:物品类型
    /// Default:0
    /// Nullable:False
    /// </summary>           
    @TableField("goods_type")
    private String goodsType ;


    /// <summary>
    /// Desc:物品规格/重量
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("goods_weight")
    private String goodsWeight ;

    /// <summary>
    /// 取消订单时间
    /// </summary>
    @TableField("cancel_time")
    private Date cancelTime ;

    /// <summary>
    /// Desc:订单备注
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("remark")
    private String remark ;

    /// <summary>
    /// Desc:运单id
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("send_sid")
    private int sendSid ;

    /// <summary>
    /// Desc:运单号
    /// Default:
    /// Nullable:False
    /// </summary>           
    @TableField("send_no")
    private String sendNo ;

    /// <summary>
    /// 配送工具类型
    /// 1：电动车
    /// 2：其它
    /// </summary>
    @TableField("DispatchingType")
    private int DispatchingType ;

    /// <summary>
    /// 其它配送工具额外加价
    /// </summary>
    @TableField("DispatchingMoney")
    private BigDecimal DispatchingMoney ;


    /// <summary>
    /// 订单中是否有新会员，下单人和发件人不一定是一个
    /// 0：没有
    /// 1：只有发件人手机号是新会员
    /// 2：只有收件人
    /// 3：发件人和收件人都是新会员
    /// </summary>
    @TableField("stat")
    private int stat ;

    /// <summary>
    /// 发单会员所在结算方案组(备用)
    /// </summary>
    @TableField("group_sid")
    private int groupId ;

    /// <summary>
    /// 发单会员所在结算方案
    /// </summary>
    @TableField("brokerage_sid")
    private int brokerageId ;

    /// <summary>
    /// 折扣 85代表八五折
    /// </summary>
    @TableField("dis_rate")
    private int disRate ;

    /// <summary>
    /// 折扣金额
    /// </summary>
    @TableField("dis_amount")
    private BigDecimal disAmount ;

    /// <summary>
    /// 数据修正（米）
    /// </summary>
    @TableField("amend_dis")
    private int amendDis ;

    /// <summary>
    /// 数据修正后的增加金额
    /// </summary>
    @TableField("amend_amount")
    private BigDecimal amendAmount ;

    @TableField("group_sid")
    private int groupSid ;
    @TableField("brokerage_sid")
    private int brokerageSid ;

}
